package com.david.cms.model;

import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * @description 栏目明细
 * @author David
 * @May 18, 2013 9:36:47 AM
 */
@Entity
@Table(name = "t_channelDetails")
public class ChannelDetails {
	/**
	 * ID号
	 */
	private Long channelDetailsId;
	/**
	 * 子栏目ID号
	 */
	private Long channelSubId;
	/**
	 * 信息来源
	 */
	private String channelDetailsFrom;
	/**
	 * 信息标题
	 */
	private String channelDetailsTitle;
	/**
	 * 信息单击量
	 */
	private int channelDetailsCount;
	/**
	 * 信息索引
	 */
	private String channelDetailsIndex;
	/**
	 * 创建时间
	 */
	private Date channelDetailsCreateDate;
	/**
	 * 内容
	 */
	private String channelDetailsContent;
	/**
	 * 是否首页
	 */
	private int channelDetailsIshome;//1是，0否
	/**
	 * 图上
	 */
	private String channelDetailsPic;
	/**
	 * 创建名称
	 */
	private String channelDetailsCreateName;
	/**
	 * 引用页
	 */
	private String channelDetailsReference;
	/**
	 * 子栏目
	 */
	private Channel channel;
	
	/**
	 * 被连接的明细
	 */
	private ChannelDetails channelDetails;
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "channelDetails")
	public ChannelDetails getChannelDetails() {
		return channelDetails;
	}

	public void setChannelDetails(ChannelDetails channelDetails) {
		this.channelDetails = channelDetails;
	}



	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "channel")
	public Channel getChannel() {
		return channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}
	/**
	 * url路径
	 */
	private String channelDetailsUrl;
	
	@Id
	@GeneratedValue
	public Long getChannelDetailsId() {
		return channelDetailsId;
	}

	public void setChannelDetailsId(Long channelDetailsId) {
		this.channelDetailsId = channelDetailsId;
	}
	@Column(name = "channelSubId")
	public Long getChannelSubId() {
		return channelSubId;
	}

	public void setChannelSubId(Long channelSubId) {
		this.channelSubId = channelSubId;
	}
	@Column(name = "channelDetailsFrom")
	public String getChannelDetailsFrom() {
		return channelDetailsFrom;
	}

	public void setChannelDetailsFrom(String channelDetailsFrom) {
		this.channelDetailsFrom = channelDetailsFrom;
	}
	@Column(name = "channelDetailsTitle")
	public String getChannelDetailsTitle() {
		return channelDetailsTitle;
	}

	public void setChannelDetailsTitle(String channelDetailsTitle) {
		this.channelDetailsTitle = channelDetailsTitle;
	}
	@Column(name = "channelDetailsCount")
	public int getChannelDetailsCount() {
		return channelDetailsCount;
	}

	public void setChannelDetailsCount(int channelDetailsCount) {
		this.channelDetailsCount = channelDetailsCount;
	}
	@Column(name = "channelDetailsIndex")
	public String getChannelDetailsIndex() {
		return channelDetailsIndex;
	}

	public void setChannelDetailsIndex(String channelDetailsIndex) {
		this.channelDetailsIndex = channelDetailsIndex;
	}
	@Column(name = "channelDetailsCreateDate")
	public Date getChannelDetailsCreateDate() {
		return channelDetailsCreateDate;
	}

	public void setChannelDetailsCreateDate(Date channelDetailsCreateDate) {
		this.channelDetailsCreateDate = channelDetailsCreateDate;
	}
	@Column(name = "channelDetailsContent")
	public String getChannelDetailsContent() {
		return channelDetailsContent;
	}

	public void setChannelDetailsContent(String channelDetailsContent) {
		this.channelDetailsContent = channelDetailsContent;
	}
	@Column(name = "channelDetailsIshome")
	public int getChannelDetailsIshome() {
		return channelDetailsIshome;
	}

	public void setChannelDetailsIshome(int channelDetailsIshome) {
		this.channelDetailsIshome = channelDetailsIshome;
	}
	@Column(name = "channelDetailsPic")
	public String getChannelDetailsPic() {
		return channelDetailsPic;
	}

	public void setChannelDetailsPic(String channelDetailsPic) {
		this.channelDetailsPic = channelDetailsPic;
	}
	@Column(name = "channelDetailsCreateName")
	public String getChannelDetailsCreateName() {
		return channelDetailsCreateName;
	}

	public void setChannelDetailsCreateName(String channelDetailsCreateName) {
		this.channelDetailsCreateName = channelDetailsCreateName;
	}
	@Column(name = "channelDetailsReference")
	public String getChannelDetailsReference() {
		return channelDetailsReference;
	}

	public void setChannelDetailsReference(String channelDetailsReference) {
		this.channelDetailsReference = channelDetailsReference;
	}
	@Column(name = "channelDetailsUrl")
	public String getChannelDetailsUrl() {
		return channelDetailsUrl;
	}

	public void setChannelDetailsUrl(String channelDetailsUrl) {
		this.channelDetailsUrl = channelDetailsUrl;
	}



}

